<template>
  <transition name="viewNodeFade">
    <div v-if="KG.viewNode && KG.viewNode.valid" class="root">
      <div class="id">{{ "ID: " + KG.viewNode.uuid }}</div>
      <div class="divider"></div>
      <div class="uri">{{ "URI: " + KG.viewNode.uri }}</div>
      <div class="divider"></div>
      <div class="label">{{ "标签: " + KG.viewNode.label }}</div>
      <div class="divider"></div>
      <div class="type">{{ "类型: " + KG.viewNode.type.name }}</div>
      <div class="divider"></div>
      <div class="type">{{ "X: " + KG.viewNode.x + " Y:" + KG.viewNode.y }}</div>
    </div>
  </transition>
</template>

<script>
/* eslint-disable */

export default {
  name: "viewNodeComponent",
  props:["KG"],
  data() {
    return {
      // KG: this.$parent.$refs.graphComponent.KG
    };
  },
  mounted() {
    // this.KG = this.$parent.$data.KG;
  },
  methods: {
    display() {
    }
  }
};
</script>

<style scoped>
.divider {
  margin: 5px auto;
  width: 96%;
  height: 0.1px;
  background-color: #cccccc;
}

.root {
  padding: 10px 0;
  position: absolute;
  right: 10px;
  bottom: 10px;
  pointer-events: none;
  opacity: 0.7;
  background-color: #303133;
  border-radius: 5px;
}

.id,
.uri,
.label,
.type {
  margin: 5px 10px 0 10px;
  width: 300px;
  text-align: left;
  word-break: break-all;
  overflow: hidden;
  font-weight: 100;
  color: #cccccc;
}

.viewNodeFade-enter,
.viewNodeFade-leave-to {
  opacity: 0;
}

.viewNodeFade-enter-active,
.viewNodeFade-leave-active {
  transition: opacity 0.5s;
}

</style>
